#region Usings

using System.Linq;
using Rail.Net.Core.Interfaces.Data;
using Rail.Net.Core.Model;
using Rail.Net.Data.Caching;

#endregion

namespace Rail.Net.Data
{
    public class RelationRepository : CacheableRepository<Relation>, IRelationRepository
    {
        public override IQueryable<Relation> AllDefaultsIncluded()
        {
            return All(r => r.RelationRus, r => r.RelationRus.Select(ru => ru.Ru),
                                r => r.Descriptions, r => r.Descriptions.Select(d => d.Station));
        }
    }
}